public class TaxDetailModel extends Object implements XMLMarshallable
charged transaction;
It completes the tax data (base amount, tax amount, total amount, tax code, tax status).
Internal Use Only
This class is for internal use only.
Details related to VAT system:
Details related to EZTax system:
ChargedTransactionThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="taxDetail">
<xs:complexType>
<xs:choice>
<xs:element name="eztaxDetail" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="vatDetail" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
EZTAX_AUTHORITY_LEVEL |
static String |
EZTAX_TAX_AMOUNT
EZTax
|
static String |
EZTAX_TAX_LOG_DATA |
static String |
EZTAX_TAX_TYPE |
static String |
VAT_BUSINESS_CATEGORY
VAT
|
static String |
VAT_TAXATION_PLACE |
| Constructor and Description |
|---|
TaxDetailModel()
Builds an empty tax detail
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
addEZTaxDetail(String name,
String value)
Adds an EZTax tax detail associated with a value
|
void |
addVatDetail(String name,
String value)
Adds a VAT tax detail associated with a value
|
String |
getEZTaxDetail(String name)
Gets the description associated with the given tax detail, if exists.
|
String |
getVatDetail(String name)
Gets the description associated with the given tax detail, if exists.
|
boolean |
isValid()
Returns true if the tax data is valid;
Tax data is valid if its name is not null or empty.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
String |
toString()
Returns a string representation of the tax data detail
|
public static final String EZTAX_TAX_AMOUNT
public static final String EZTAX_TAX_TYPE
public static final String EZTAX_AUTHORITY_LEVEL
public static final String EZTAX_TAX_LOG_DATA
public static final String VAT_BUSINESS_CATEGORY
public static final String VAT_TAXATION_PLACE
public void addEZTaxDetail(String name, String value)
name - The name of the tax data detailvalue - The value associated with the given tax data detailpublic void addVatDetail(String name, String value)
name - The name of the tax detailvalue - The value associated with the given tax detailpublic String getEZTaxDetail(String name)
name - The name of the tax detailpublic String getVatDetail(String name)
name - The name of the tax detailpublic boolean isValid()
public String toString()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into